package doctor

import (
	"context"
	"srv/config"
	"srv/internal/model/dao"
	__ "srv/proto"
)

// 实现方法
func (s *DoctorService) UpdateHao(ctx context.Context, req *__.UpdateHaoRequest) (resp *__.UpdateHaoResponse, err error) {
	var hao dao.Hao
	config.DB.Where("name=?", req.Name).Limit(1).Find(&hao)
	config.DB.Model(&hao).Update("doctor", req.Doctor)
	return &__.UpdateHaoResponse{Id: int64(hao.ID)}, nil
}
